#ifndef _SG_AUDIO_DEC_FFMPEG_H
#define _SG_AUDIO_DEC_FFMPEG_H

#ifdef __cplusplus
extern "C" {
#endif

#if defined(_USRDLL)
#  if defined (_MSC_VER)
#    ifdef SOGOU_AUDIO_DEC_LIB_EXPORTS
#      define __SOGOU_API__ __declspec(dllexport)
#    else
#      define __SOGOU_API__ __declspec(dllimport)
#    endif
#  else
#    define __SOGOU_API__ __attribute__ ((__visibility__("default")))
#  endif
#else
#define __SOGOU_API__
#endif

    typedef struct _sg_ffmpeg_ins {
        int unused;
    } sg_ffmpeg_ins;

    __SOGOU_API__ sg_ffmpeg_ins* sg_ffmpeg_create(int out_sample_rate);
    __SOGOU_API__ void sg_ffmpeg_release(sg_ffmpeg_ins* dec);
    __SOGOU_API__ int sg_ffmpeg_send_data(sg_ffmpeg_ins* dec, char* indata, int inlen);
    __SOGOU_API__ int sg_ffmpeg_send_all(sg_ffmpeg_ins* dec, char* indata, int inlen);
    __SOGOU_API__ int sg_ffmpeg_decode(sg_ffmpeg_ins* dec, char* outdata, int* outlen);
    __SOGOU_API__ void sg_ffmpeg_start(sg_ffmpeg_ins* dec);
    __SOGOU_API__ void sg_ffmpeg_stop(sg_ffmpeg_ins* dec);

#ifdef __cplusplus
}
#endif

#endif //_SG_AUDIO_DEC_H
